package com.itheima.d07singleton;
/*
    单例模式
    1.解决问题
    2.设计模式
 */
public class Test {
    public static void main(String[] args) {
        TaskManager tm1 = TaskManager.getInstance();
        TaskManager tm2 = TaskManager.getInstance();
        TaskManager tm3 = TaskManager.getInstance();

        System.out.println(tm1);
        System.out.println(tm2);
        System.out.println(tm3);

        GC gc1= GC.getInstance();
        GC gc2= GC.getInstance();
        GC gc3= GC.getInstance();
        System.out.println(gc1);
        System.out.println(gc2);
        System.out.println(gc3);
    }
}
